package com.gitee.wsl.func.consumer

import com.gitee.wsl.func.CallAbleFun
import com.gitee.wsl.func.InvokeCall

typealias ConsumerFun<A> = CallAbleFun<A,Unit>

fun interface Consumer<T> :InvokeCall<T,Unit> {
    fun accept(a: T)

    override fun invoke(t: T) = accept(t)
}

fun<T> Consumer<T>.toLambda() : ConsumerFun<T> = ::accept
